//test
import util from '../common/util'

export const increment = ({commit}) => {
  commit('INCREMENT')
};
export const decrement = ({commit}) => {
  commit('DECREMENT')
};
export const setUser = ({commit}, user) => {
  commit('SETUSER', user)
};
export const setDataCenter = ({commit}, datacenter) => {
  return new Promise((resolve, reject) => {
    util.save('dataCenterId',datacenter.data_center_id);
    commit('SETDATACENTER', datacenter);
    resolve()
  })
};
export const setDataCenterList = ({commit}, list) => {
  commit('SETDATACENTERLIST', list)
};
export const setRoles = ({commit}, roles) => {
  commit('SETROLES', roles)
};
export const setTenants = ({commit}, tenants) => {
  commit('SETTENANTS', tenants)
};
export const setPage6Sql = ({commit}, page6Sql) => {
  return new Promise((resolve, reject) => {
    commit('SETPAGE6SQL', page6Sql);
    resolve()
  })
};
export const resetAll = ({commit}) => {
  return new Promise((resolve, reject) => {
    commit('RESETALL');
    resolve()
  })
};